﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yto.Common.Time;

namespace Yto.Entities.Record
{
    [Serializable]
    public abstract class CreateEntity : CreateEntity<int>
    {
    }

    [Serializable]
    public abstract class CreateEntity<T> : Entity<T>, ICreate
    {
        [Column("CREATORID")]
        public virtual long? CreatorId { get; set; }

        [Column("CREATETIME")]
        public virtual DateTime CreateTime { get; set; }

        protected CreateEntity()
        {
            CreateTime = TimeHelper.Now;
        }
    }
}
